package scrum.client.common;

import java.util.ArrayList;
import java.util.List;

import scrum.client.project.Requirement;

public abstract class RequirementsFilter {

	public List<Requirement> applyFilter(List<Requirement> toFilter) {
		List<Requirement> filtered = new ArrayList<Requirement>(toFilter); // copy the list to filter
		if (setupDone()) filtered = doFilter(filtered);

		return filtered;
	}

	protected abstract List<Requirement> doFilter(List<Requirement> toFilter);

	protected abstract boolean setupDone();

}
